<?php
/**
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       app.View.Layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
 */

$cakeDescription = __d('cake_dev', 'SiempreGuapa');
$cakeVersion = __d('cake_dev', 'CakePHP %s', Configure::version())
?>
<!DOCTYPE html>
<html>
<head>
	<?php echo $this->Html->charset(); ?>
	<title>
		<?php echo $this->fetch('title'); ?> &raquo; <?php echo $cakeDescription ?>
	</title>
	<?php
		echo $this->Html->meta('icon');
		echo $this->Html->css('bootstrap');
		echo $this->Html->css('font-awesome/css/font-awesome.css');
        echo $this->Html->css('zabuto_calendar.css');
        echo $this->Html->css('../js/gritter/css/jquery.gritter.css');
        echo $this->Html->css('lineicons/style.css');
        echo $this->Html->css('style.css');
        echo $this->Html->css('style-responsive.css');
		echo $this->fetch('meta');
		echo $this->fetch('css');
		echo $this->fetch('script');
        echo $this->Html->script('jquery'); 
    echo $this->Html->script('jquery-1.8.3.min'); 
	?>
</head>
<body>



<section id="container" >
      <!-- **********************************************************************************************************************************************************
      TOP BAR CONTENT & NOTIFICATIONS
      *********************************************************************************************************************************************************** -->
      <!--header start-->
      <header class="header black-bg">
              <div class="sidebar-toggle-box">
                  <div class="fa fa-bars tooltips" data-placement="right" data-original-title="Switch menu"></div>
              </div>
            <!--logo start-->
            <?php echo $this->Html->link("<b>$cakeDescription</b>", array('controller' => 'Pages', 'action' => 'display', 'home'), array('escape' => false, 'class' => 'logo')); ?>
            <!--logo end-->
            <div class="nav notify-row" id="top_menu">
                <!--  notification start -->
                <ul class="nav top-menu">
                    <!-- settings start -->
                    <li class="dropdown">
                        <a data-toggle="dropdown" class="dropdown-toggle" href="index.html#">
                            <i class="fa fa-tasks"></i>
                            <span class="badge bg-theme">4</span>
                        </a>
                        <ul class="dropdown-menu extended tasks-bar">
                            <div class="notify-arrow notify-arrow-green"></div>
                            <li>
                                <p class="green">You have 4 pending tasks</p>
                            </li>
                            <li>
                                <a href="index.html#">
                                    <div class="task-info">
                                        <div class="desc">DashGum Admin Panel</div>
                                        <div class="percent">40%</div>
                                    </div>
                                    <div class="progress progress-striped">
                                        <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
                                            <span class="sr-only">40% Complete (success)</span>
                                        </div>
                                    </div>
                                </a>
                            </li>
                            <li>
                                <a href="index.html#">
                                    <div class="task-info">
                                        <div class="desc">Database Update</div>
                                        <div class="percent">60%</div>
                                    </div>
                                    <div class="progress progress-striped">
                                        <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
                                            <span class="sr-only">60% Complete (warning)</span>
                                        </div>
                                    </div>
                                </a>
                            </li>
                            <li>
                                <a href="index.html#">
                                    <div class="task-info">
                                        <div class="desc">Product Development</div>
                                        <div class="percent">80%</div>
                                    </div>
                                    <div class="progress progress-striped">
                                        <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%">
                                            <span class="sr-only">80% Complete</span>
                                        </div>
                                    </div>
                                </a>
                            </li>
                            <li>
                                <a href="index.html#">
                                    <div class="task-info">
                                        <div class="desc">Payments Sent</div>
                                        <div class="percent">70%</div>
                                    </div>
                                    <div class="progress progress-striped">
                                        <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width: 70%">
                                            <span class="sr-only">70% Complete (Important)</span>
                                        </div>
                                    </div>
                                </a>
                            </li>
                            <li class="external">
                                <a href="#">See All Tasks</a>
                            </li>
                        </ul>
                    </li>
                    <!-- settings end -->
                    <!-- inbox dropdown start-->
                    <li id="header_inbox_bar" class="dropdown">
                        <a data-toggle="dropdown" class="dropdown-toggle" href="index.html#">
                            <i class="fa fa-envelope-o"></i>
                            <span class="badge bg-theme">5</span>
                        </a>
                        <ul class="dropdown-menu extended inbox">
                            <div class="notify-arrow notify-arrow-green"></div>
                            <li>
                                <p class="green">You have 5 new messages</p>
                            </li>
                            <li>
                                <a href="index.html#">
                                    <span class="photo"><img alt="avatar" src="img/ui-zac.jpg"></span>
                                    <span class="subject">
                                    <span class="from">Zac Snider</span>
                                    <span class="time">Just now</span>
                                    </span>
                                    <span class="message">
                                        Hi mate, how is everything?
                                    </span>
                                </a>
                            </li>
                            <li>
                                <a href="index.html#">
                                    <span class="photo"><img alt="avatar" src="img/ui-divya.jpg"></span>
                                    <span class="subject">
                                    <span class="from">Divya Manian</span>
                                    <span class="time">40 mins.</span>
                                    </span>
                                    <span class="message">
                                     Hi, I need your help with this.
                                    </span>
                                </a>
                            </li>
                            <li>
                                <a href="index.html#">
                                    <span class="photo"><img alt="avatar" src="img/ui-danro.jpg"></span>
                                    <span class="subject">
                                    <span class="from">Dan Rogers</span>
                                    <span class="time">2 hrs.</span>
                                    </span>
                                    <span class="message">
                                        Love your new Dashboard.
                                    </span>
                                </a>
                            </li>
                            <li>
                                <a href="index.html#">
                                    <span class="photo"><img alt="avatar" src="img/ui-sherman.jpg"></span>
                                    <span class="subject">
                                    <span class="from">Dj Sherman</span>
                                    <span class="time">4 hrs.</span>
                                    </span>
                                    <span class="message">
                                        Please, answer asap.
                                    </span>
                                </a>
                            </li>
                            <li>
                                <a href="index.html#">See all messages</a>
                            </li>
                        </ul>
                    </li>
                    <!-- inbox dropdown end -->
                </ul>
                <!--  notification end -->
            </div>
            <div class="top-menu">
            	<ul class="nav pull-right top-menu">
                    <li><?php echo $this->Html->link('Salir', array('controller' => 'Usuarios', 'action' => 'logout'), array('class' => 'logout')) ?></li>
            	</ul>
            </div>
        </header>
      <!--header end-->
      
      <!-- **********************************************************************************************************************************************************
      MAIN SIDEBAR MENU
      *********************************************************************************************************************************************************** -->
      <!--sidebar start-->
      <aside>
          <div id="sidebar"  class="nav-collapse ">
              <!-- sidebar menu start-->
<ul class="sidebar-menu" id="nav-accordion">
	<!--PERFIL-->
		<p class="centered"><a href="profile.html"><img src="img/ui-sam.jpg" class="img-circle" width="60"></a></p>
		<h5 class="centered">Marcel Newman</h5>
	<!--/PERFIL-->
	<li class="mt">
		<?php 
			echo $this->Html->link(
				'<i class="fa fa-dashboard"></i><span>Dashboard</span>', 
				array('controller' => 'Pages', 'action' => 'display', 'home'), 
				array('escape' => false)
			); 
		?>
	</li>
	<li class="sub-menu">
		<a href="javascript:;" >
			<i class="fa fa-user"></i>
			<span>Clientes</span>
		</a>
		<ul class="sub">
			<li><?php echo $this->Html->link(__('Nuevo'), array('controller' => 'Usuarios', 'action' => 'add')); ?></li>
			<li><?php echo $this->Html->link(__('Todos'), array('controller' => 'Usuarios', 'action' => 'index')); ?></li>
		</ul>
	</li>
	<li class="sub-menu">
		<a href="javascript:;" >
			<i class="fa fa-medkit"></i>
			<span>Tratamientos</span>
		</a>
		<ul class="sub">
			<li><?php echo $this->Html->link(__('Nuevo'), array('controller' => 'tratamientos', 'action' => 'add')); ?></li>
			<li><?php echo $this->Html->link(__('Todos'), array('controller' => 'tratamientos', 'action' => 'index')); ?></li>
		</ul>
	</li>
	<li class="sub-menu">
		<a href="javascript:;" >
			<i class="fa fa-stethoscope"></i>
			<span>Alergias</span>
		</a>
		<ul class="sub">
			<li><?php echo $this->Html->link(__('Nuevo'), array('controller' => 'Alergias', 'action' => 'add')); ?></li>
			<li><?php echo $this->Html->link(__('Todos'), array('controller' => 'Alergias', 'action' => 'index')); ?></li>
		</ul>
	</li>
	<li class="sub-menu">
		<a href="javascript:;" >
			<i class="fa fa-dollar"></i>
			<span>Ventas</span>
		</a>
		<ul class="sub">
			<li><?php echo $this->Html->link(__('Nuevo'), array('controller' => 'Ventas', 'action' => 'add')); ?></li>
			<li><?php echo $this->Html->link(__('Todos'), array('controller' => 'Ventas', 'action' => 'index')); ?></li>
		</ul>
	</li>
</ul>
              <!-- sidebar menu end-->
          </div>
      </aside>
      <!--sidebar end-->
      
      <!-- **********************************************************************************************************************************************************
      MAIN CONTENT
      *********************************************************************************************************************************************************** -->
      <!--main content start-->
<section id="main-content">
<section class="wrapper">
	<div class="row">
		<div class="col-sm-12">
			<?php //echo $this->Session->flash(); ?>
		</div>
	</div>
	<div class="row">
		<div class="col-xs-12">
			<?php echo $this->fetch('content'); ?>
		</div>
	</div>
</section>
</section>


      <!--main content end-->
      <!--footer start-->
      <footer class="site-footer">
          <div class="text-center">
              QH Soluciones | 2015
              <a href="#container" class="go-top">
                  <i class="fa fa-angle-up"></i>
              </a>
          </div>
      </footer>
      <!--footer end-->
  </section>

<?php 
	
    echo $this->Html->script('chart-master/Chart'); 
	echo $this->Html->script('bootstrap.min');
	echo $this->Html->script('jquery.dcjqaccordion.2.7');
	echo $this->Html->script('jquery.scrollTo.min');
	echo $this->Html->script('jquery.nicescroll');
	echo $this->Html->script('jquery.sparkline');
	echo $this->Html->script('common-scripts');
	echo $this->Html->script('gritter/js/jquery.gritter');
	echo $this->Html->script('gritter-conf');
	echo $this->Html->script('sparkline-chart');
	echo $this->Html->script('zabuto_calendar');
?>
<script type="text/javascript">
	var alto = window.innerHeight - 38;
        $(document).ready(function () {
		
        <?php echo $this->Session->flash(); ?>
        return false;
        });

	$(document).ready(function () {
		$('#main-content').css('min-height', alto);
		$("#date-popover").popover({html: true, trigger: "manual"});
		$("#date-popover").hide();
		$("#date-popover").click(function (e) {
			$(this).hide();
		});
		$("#my-calendar").zabuto_calendar({
			action: function () {
				return myDateFunction(this.id, false);
			},
			action_nav: function () {
				return myNavFunction(this.id);
			},
			ajax: {
				url: "show_data.php?action=1",
				modal: true
			},
			legend: [
				{type: "text", label: "Special event", badge: "00"},
				{type: "block", label: "Regular event", }
			]
		});
	});
	function myNavFunction(id) {
		$("#date-popover").hide();
		var nav = $("#" + id).data("navigation");
		var to = $("#" + id).data("to");
		console.log('nav ' + nav + ' to: ' + to.month + '/' + to.year);
	}
</script>

</body>
</html>
